<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<div class="box" style="text-align: left; height: auto;">
<div id="ss">

<table style="width: 100%" border="0" align="center" cellspacing="2">
	<tbody style="width: 100%" >
	<?php
	$mc=0;
	foreach ($products as $product) {
		if($mc%2==0){?>
		<tr style="width: 100%">
			<td align="center">
				<table class="product_detail" style="width: 100%;height: 260px;">
					<tr>
						<td valign="top" style="width: 108px;">
							<a href="<?php echo url::base(FALSE).''.$product->image?>" >
								<img style="border: 2px solid #000;" src="<?php echo url::base(FALSE).''.$product->thumbnail?>"/>
							</a>
							<p>ราคา :: &nbsp;<?=$product->price?>&nbsp;&nbsp;บาท</p>
							<p>
								<a href="<?= url::site("basket/add_to_basket/$product->id") ?>"  title="เพิ่มใส่ตระกร้า.." class="g-dialog-link">
							       <img style="border: 0px;" src="<?=url::base(FALSE)."/images/icon/add_to_cart.png"?>" />
							    </a>
							</p>
						
						</td>
						<td valign="top">
							<p>รหัสสินค้า&nbsp;::&nbsp;<?=$product->id?></p>
							<p>ชื่อสินค้า&nbsp;::&nbsp;<?=$product->name?></p>
							<p>รายละเอียด&nbsp;::&nbsp;<?=$product->description?></p>
						</td>
					</tr>
				</table>
			</td>
			<?php }else{ ?>
			<td align="center">
				<table class="product_detail" style="width: 100%;height: 260px;">
					<tr>
							<td valign="top" style="width: 108px;">
								<a href="<?php echo url::base(FALSE).''.$product->image?>" >
								<img style="border: 2px solid #000;" src="<?php echo url::base(FALSE).''.$product->thumbnail?>"/>
								</a>
								<p>ราคา :: &nbsp;<?=$product->price?>&nbsp;&nbsp;บาท</p>
								<p>
									<a href="<?= url::site("basket/add_to_basket/$product->id") ?>"  title="เพิ่มใส่ตระกร้า.." class="g-dialog-link">
								       <img style="border: 0px;" src="<?=url::base(FALSE)."/images/icon/add_to_cart.png"?>" />
								    </a>
								</p>
							</td>
							<td valign="top">
								<p>รหัสสินค้า&nbsp;::&nbsp;<?=$product->id?></p>
								<p>ชื่อสินค้า&nbsp;::&nbsp;<?=$product->name?></p>
								<p>รายละเอียด&nbsp;::&nbsp;<?=$product->description?></p>
							</td>
						</tr>
				</table>
			</td>
		<tr>
		<?php }
		$mc++;
	}?>
	
	</tbody>
</table>
</div>
<table style="width: 100%">
	<tr style="width: 100%">
		<td style="width: 50px">Page :: &nbsp;</td>
		<td align="left"><?=$pagination->render()?></td>
	</tr>
</table>
<?php echo "count : ".$product_count ?>
</div>
